package com.my.yyr.service.safty.impl;

import com.my.yyr.dao.safty.RoleDao;
import com.my.yyr.dto.RoleDto;
import com.my.yyr.model.Role;
import com.my.yyr.service.safty.RoleService;
import com.my.yyr.until.Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

import static javafx.scene.input.KeyCode.R;

@Service @Transactional
public class RoleSerivceImpl implements RoleService {

    private RoleDao roleDao;
    @Autowired
    public RoleSerivceImpl(RoleDao roleDao) {
        this.roleDao = roleDao;
    }

    @Override
    public List<Role> getRolePage(RoleDto roleDto) {
//        List<Role> lists = roleDao.findRoleList(roleDto);
//int i=0;
//        for(Role r : lists){
//           i++;
//            System.out.println(i+"数据:"+"-"+r.getRo_id()+"-"+r.getRo_name()+"-"+r.getRo_remark()+"-"+r.getU_id());
//        }
        //测试是否向页面成功传递内容,并打印传递内容的属性


        return roleDao.findRoleList(roleDto);
    }
}
